cmd/evm: implement input txs via rlp in t8n tool#23138
Merged
Merged
Conversation
tynes
reviewed
Jul 8, 2021
Contributor
|
I do send now tx as RLP to geth. works fine on this branch. |
fjl
reviewed
Jul 27, 2021
Contributor
Author
|
@fjl can I haz a review? |
MariusVanDerWijden
approved these changes
Jul 27, 2021
| Name: "input.txs", | ||
| Usage: "`stdin` or file name of where to find the transactions to apply.", | ||
| Name: "input.txs", | ||
| Usage: "`stdin` or file name of where to find the transactions to apply. " + |
Member
There was a problem hiding this comment.
Maybe we can add a comment that RLP list over stdin is not supported
echo signed_txs.rlp | ./evm t8n --state.fork=London --input.alloc=./testdata/13/alloc.json --input.txs=stdin --input.env=./testdata/13/env.json --output.result=alloc_rlptx.json
ERROR(10): failed unmarshaling stdin: invalid character 's' looking for beginning of value
Contributor
Author
There was a problem hiding this comment.
Heh. Try cat instead of echo :)
Member
There was a problem hiding this comment.
I'm doofus, but the general point still stands. We can't read RLP from stdin, because L147 tries to decode into an input object
cat signed_txs.rlp | ./evm t8n --state.fork=London --input.alloc=./testdata/13/alloc.json --input.txs=stdin --input.env=./testdata/13/env.json --output.result=alloc_rlptx.json
ERROR(10): failed unmarshaling stdin: json: cannot unmarshal string into Go value of type t8ntool.input
Contributor
Author
There was a problem hiding this comment.
Yup, good catch! Fixing...
Contributor
Author
There was a problem hiding this comment.
Fixed this in my last commit. One can't just take the output and feed to the input, since the input can contain many things. Therefore, you need to envelop the leaf json into an object, and call it txsRlp:
[user@work evm]$ cat signed_txs.rlp.json| jq .
{
"txsRlp": "0xf8d2b86702f864010180820fa08284d09411111111111111111111111111111111111111118080c001a0b7dfab36232379bb3d1497a4f91c1966b1f932eae3ade107bf5d723b9cb474e0a06261c359a10f2132f126d250485b90cf20f30340801244a08ef6142ab33d1904b86702f864010280820fa08284d09411111111111111111111111111111111111111118080c080a0d4ec563b6568cd42d998fc4134b36933c6568d01533b5adf08769270243c6c7fa072bf7c21eac6bbeae5143371eef26d5e279637f3bd73482b55979d76d935b1e9"
}
[user@work evm]$ cat signed_txs.rlp.json| ./evm t8n --state.fork=London --input.alloc=./testdata/13/alloc.json --input.txs=stdin --input.env=./testdata/13/env.json --output.result=alloc_rlptx.json
INFO [07-28|09:56:08.806] Trie dumping started root=672261..31e1e5
INFO [07-28|09:56:08.806] Trie dumping complete accounts=3 elapsed="211.905µs"
INFO [07-28|09:56:08.806] Wrote file file=alloc.json
INFO [07-28|09:56:08.810] Wrote file file=alloc_rlptx.json
sidhujag
pushed a commit
to sidhujag/go-ethereum
that referenced
this pull request
Aug 15, 2021
In many cases, it's desireable to use already-signed transactions as input to the state transition, instead of having the evm sign them internally (for example to use malformed or not-yet-valid transactions). This PR adds support + docs for that feature.
atif-konasl
pushed a commit
to frozeman/pandora-execution-engine
that referenced
this pull request
Oct 15, 2021
In many cases, it's desireable to use already-signed transactions as input to the state transition, instead of having the evm sign them internally (for example to use malformed or not-yet-valid transactions). This PR adds support + docs for that feature.
This was referenced Sep 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #22963. In many cases, it's desireable to use already-signed transactions as input to the state transition, instead of having the evm sign them internally (for example to use malformed or not-yet-valid transactions).
This PR adds support + docs for that feature.
cc @winsvega